/**
 * 日志接口
 * @author luguoxiang
 * @date 2021-09-07
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
import request, {createApi} from "@/soar/utils/request";

export const basePath = '/system/log';
export const subject = '操作日志';
export const api = createApi(basePath, subject);

export default {
  ...api,
};

/**
 * 发送日志到后端，解决线上无法查看日志问题
 * @param code
 * @param log
 */
export function push(code: string, log: any): Promise<any> {
  return request.post(`${basePath}/push`, {
    successMsg: false,
    errorMsg: false,
    data: { code, log },
  });
}
